<%@page import="com.netistate.pojo.ProjectServices"%>
<%@page import="com.netistate.pojo.User"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% String id = (String)request.getSession().getAttribute("projectid"); %>
<div class="minWin">
   <form id="myForm" action="#" method="post">
	<table id="addServiceTable" width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="bg_color_common" style="font-size: 12">
	<thead>
		<input type="hidden" name="pid" id="pid" value="<%=id%>"/>
		<%
	        Date date = new Date();
		    SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd");
		    String supporDate = sdFormat.format(date);
		    Calendar calendar = Calendar.getInstance();
		    calendar.setTime(date);
		 %>
		 <input type="hidden" name="pid" id="editPSid" value="${sessionScope.selectProjectServices.id }"/>
		 <input type="hidden" name="editServiceNo" id="editServiceNo" value="${sessionScope.selectProjectServices.serviceNo }"/>
		<tr>
			<td title="提供服务日期" align="right">提供服务日期：</td>
			<td >
				<input type="text" onclick="MyCalendar.SetDate(this)" readonly="readonly" id="editPSSupportDate" value="${sessionScope.selectProjectServices.supportDate }" class="input3"  style="width: 100px" name="day" >
				<span title="用了">用了</span>
				<input type="text" style="width: 50px" value="${sessionScope.selectProjectServices.hours }" id="editPSHours">
				<span title="小时">小时</span>
			</td>
		</tr>
		
		<%List<User> userlist = (List<User>)request.getSession().getAttribute("userList");
			ProjectServices ps = (ProjectServices)request.getSession().getAttribute("selectProjectServices");
		 %>
		<tr>
			<td title="我方人员" align="right">我方人员：
			</td>
			<td>
				<% for(User u : userlist){%>
					<span style="display:inline;width:60px">
			   			<input type="checkbox" <%=ps.getOurPeople().indexOf(u.getRealName()+",")>=0?"checked":"" %> name="editPSOurPeople" value="<%=u.getRealName() %>" /><%=u.getRealName() %>
			   		</span>	
			   	<%}%>
			</td>
		</tr>
		<tr>
			<td title="他方人员" align="right">他方人员：
			</td>
			<td>
				<input type="text" name="" value="${sessionScope.selectProjectServices.otherPeople }" id="editPSOtherPeople"/>
			</td>
		</tr>
		<tr>
			<td title="服务方式" align="right">服务方式：</td>
			<td>
				<select id="editPSServiceType" name="serviceType">
				   <% if("客户现场".equals(ps.getServiceType())){ %>
					 	<option selected="selected" value="客户现场">客户现场</option>
					 	<option value="远程支持">远程支持</option>
					   <option value="电话会议">电话会议</option>
					   <option value="公司会议">公司会议</option>
					   <option value="其他">其他</option>
					<%} %>
					 <% if("远程支持".equals(ps.getServiceType())){ %>
					 	<option selected="selected" value="远程支持">远程支持</option>
					 	<option value="客户现场">客户现场</option>
					   <option value="电话会议">电话会议</option>
					   <option value="公司会议">公司会议</option>
					   <option value="其他">其他</option>
					<%} %>
					 <% if("电话会议".equals(ps.getServiceType())){ %>
					 	<option selected="selected" value="电话会议">电话会议</option>
					 	<option value="远程支持">远程支持</option>
					   <option value="客户现场">客户现场</option>
					   <option value="公司会议">公司会议</option>
					   <option value="其他">其他</option>
					<%} %>
					 <% if("公司会议".equals(ps.getServiceType())){ %>
					 	<option selected="selected" value="公司会议">公司会议</option>
					 	<option value="远程支持">远程支持</option>
					   <option value="电话会议">电话会议</option>
					   <option value="客户现场">客户现场</option>
					   <option value="其他">其他</option>
					<%} %>
					 <% if("其他".equals(ps.getServiceType())){ %>
					 	<option selected="selected" value="其他">其他</option>
					 	<option value="远程支持">远程支持</option>
					   <option value="电话会议">电话会议</option>
					   <option value="公司会议">公司会议</option>
					   <option value="客户现场">客户现场</option>
					<%} %>
				</select>
			</td>
		</tr>
		<tr>
			<td title="支持地点" align="right">支持地点：
			</td>
			<td>
				<input type="text" name="address" value="${sessionScope.selectProjectServices.address }" id="editPSAddress"/>
			</td>
		</tr>
		
		<c:forEach var="psdList" items="${sessionScope.selectPSDetailList }">
			<tr>
				<td title="${psdList.infoTypeName }" align="right">${psdList.infoTypeName }：
				</td>
				<td>
					<textarea rows="4" cols="30" title="${psdList.infoTypeNo }" name="${psdList.infoTypeNo }" id="${psdList.infoTypeNo }">${psdList.workNote }</textarea>
				</td>
			</tr>
		</c:forEach>
		</thead>
	</table>
	</form>
</div>
